import axios  from "@/utils/axios";

export function majorInfo(query) {
    return axios({
        url: '/major/info/condition',
        method: 'get',
        params: query
    })
}

export function getDirectorName() {
    let query = {
        techPosition: '3'
    }
    return axios({
        url: '/comment/positionName',
        method: 'get',
        params: query
    })
}

export function getMaxId() {
    return axios({
        url: '/comment/maxMajorId',
        method: 'get',
    })
}


export function getDepartName() {
    return axios({
        url: '/comment/treeData',
        method: 'get',
    })
}

export function getFacultyName() {
    return axios({
        url: '/comment/facultyData',
        method: 'get',
    })
}

export function majorUpdate(query) {
    return axios({
        url: '/major/update/info',
        method: 'post',
        params: query
    })
}

export function majorInsert(query) {
    return axios({
        url: '/major/insert/info',
        method: 'post',
        params: query
    })
}

export function clickConfirm(data) {
    return axios({
        url: "/major/check",
        method: 'put',
        data: data
    })
}


